All Questions
18 questions
1vote
0answers
62views
Principal Variation Search (PVS) for playing Connect Four in Java
This time, I have an implementation of PVS (Principal Variation Search) algorithm for playing the game of Connect Four. The repository holding the above .java file ...
4votes
1answer
102views
Multithreaded Alpha-beta pruning for playing Connect Four in Java
Intro (The entire repository is in GitHub.) This time, I have parallelized the famous Alpha-beta pruning algorithm. The idea is that the parallel algorithm descends in a game tree (at least) 2 levels ...
4votes
3answers
289views
Connect4.java - The Connect Four game against an Alpha-beta pruning -based AI bot
I have this GitHub repository. It implements the command-line version of the Connect Four game. The AI bot is implemented via Alpha-beta pruning. Code ...
5votes
0answers
1kviews
Mahjong hand completeness checking algorithm
As a summer project, I have been working on a small-scale, console-based version of Mahjong (the Rummy-like hand completion game, and not the solitaire version). While having prior knowledge of the ...
2votes
1answer
327views
A Connect Four evaluation function in Java is not smart enough [closed]
I have a couple of projects: GameAI ConnectFour GameAI implements a couple of algorithms: Minimax, Alpha-beta pruning and Alpha-beta pruning with state ordering. ...
2votes
1answer
1kviews
Java Pathfinding Lee Algorithm
For my Pacman game i need to implement a pathfinding algorithm. I decide to do it with the Lee Algorithm, because in my opinion it's easier to understand than e.g. A* Star algorithm. I tried to ...
6votes
1answer
406views
Handling collision on a turn-based 2D game
I have implemented a collision check algorithm that I have created for my game, and the algorithm uses recursion. Now it all works fine, and I thought to myself, what if there was a way to solve this ...
5votes
1answer
22kviews
Java Connect Four "Four in a row" detection algorithms
I am making a connect four type game for my end of the year project in my programming class. I am about to start building off of the console based version I have made and add a GUI, but I feel sort ...
9votes
2answers
4kviews
Calculating the fastest strategy in OGame
For a game I am playing, OGame, I am trying to calculate the fastest strategy to reach a certain state in the game, relevant parts of the game for this question are: You can build different types of ...
6votes
1answer
120views
Normalizing forces for basketball game
Recently I found the need to implement a normalization formula in a couple of places in my basketball game, so I created some static methods inside of a class to do so. ...
6votes
2answers
3kviews
Sudoku game with varied difficulty level
I created a Sudoku game with varied difficulty level. The Sudoku board creation process consist three stages: Creation of an empty board Filling the board with numbers Making holes in the filled game ...
14votes
3answers
311views
What kind of Wall should it be? (for an RPG)
I'm creating an RPG type game, and now I am working on procedural town generation. The algorithm for that creates some roads going horizontally and vertically, and then attempts to place buildings in ...
13votes
2answers
9kviews
Let's (path) find A Star
Yesterday I found myself struggling with creating an A * algorithm in Java, but this morning I finally figured it out, so I would love to hear what Code Review has to say about it! The goal here is ...
10votes
2answers
2kviews
WaTor Code in Java
I just coded a version of WaTor, a population simulation game in which fish and sharks move around, breed, and eat each other. I am wondering how I did and if there are better ways to do some of the ...
15votes
2answers
503views
Do they have the POWER?
I'm working on a city building simulation game, and I have reached the point where I need to check whether tiles are connected to a power source. I decided on a flood fill for this, since it seemed ...